package trees;
import java.util.List;

/**
 * BinarySearchTree Interface
 * 
 */
public interface BinarySearchTree {

	/**
	 * Traversierungen
	 */
	public enum Order {
		INORDER, PREORDER, POSTORDER, LEVELORDER
	}

	/**
	 * Puts unique value of type Integer (>=0) into tree. If not unique, throws
	 * BinarySearchTreeException.
	 * 
	 * @param value_
	 * @throws BinarySearchTreeException
	 */
	public abstract void addValue(Integer value_)
			throws BinarySearchTreeException;

	/**
	 * Deletes value from tree. If value not exists throws
	 * BinarySearchTreeException.
	 * 
	 * @param value_
	 * @throws BinarySearchTreeException
	 */
	public abstract boolean delValue(Integer value_)
			throws BinarySearchTreeException;

	/**
	 * True if value is tree element.
	 * 
	 * @param value_
	 * @return True or False
	 */
	public abstract boolean hasValue(Integer value_);

	/**
	 * Depth of tree: Level + 1.
	 * 
	 * @return depth
	 */
	public abstract int getDepth(Node node);
	
	
	public int maxHeight();
	

	/**
	 * Traverses tree by enum Order o: INORDER, PREORDER, POSTORDER or LEVELORDER.
	 * 
	 * @param o
	 * @return Returns a ordered list.
	 */
	public abstract List<Integer> traverseTree(Order o);


}
